/* 全局样式 */
body {
  font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
  /* 更符合中文显示的字体 */
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  /* 更柔和的背景色 */
  color: #333;
  /* 深灰色文字更易读 */
  line-height: 1.6;
  /* 更好的行间距 */
}

/* 页眉样式 */
header {
  background: linear-gradient(135deg, #3498db, #2e86de);
  /* 渐变蓝色背景 */
  color: #fff;
  padding: 1.5em 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  /* 轻微阴影增加层次感 */
}

header h1 {
  margin: 0;
  font-size: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  /* 文字阴影增强可读性 */
}

header nav a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid transparent;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.3s, border-color 0.3s;
}

header nav a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #fff;
} 

/* 主内容区 */
main {
  padding: 2rem;
  max-width: 500px;
  margin: 2rem auto;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  /* 更明显的阴影效果 */
}

/* 表单容器 */
.container {
  padding: 2rem;
}

.container h2 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  text-align: center;
  position: relative;
}

.container h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: #3498db;
  margin: 0.5rem auto 0;
}

/* 表单元素组 */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #495057;
}

/* 输入框统一样式 */
.form-group input[type="text"],
.form-group input[type="password"],
#identifier {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  /* 防止padding影响宽度 */
}

.form-group input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  outline: none;
}

/* 提示文字 */
.form-group small {
  display: block;
  margin-top: 6px;
  color: #777;
  font-size: 0.85rem;
}

a {
  color: #3498db;
  text-decoration: none;
  margin-top: 10px;
  display: inline-block;
}

a:hover {
  text-decoration: underline;
}

/* 按钮样式 */
button {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 1.5rem;
  background: linear-gradient(to right, #3498db, #2e86de);
  /* 渐变按钮 */
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background: linear-gradient(to right, #2e86de, #2980b9);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button:active {
  transform: translateY(0);
}

/* 密码显示/隐藏按钮 */
.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #777;
  font-size: 1.1rem;
  transition: color 0.3s;
  background: none;
  border: none;
  padding: 0 5px;
}

.toggle-password:hover {
  color: #3498db;
}

/* 状态消息样式 */
#status {
  margin-bottom: 1.5rem;
}

.error-message {
  color: #d63031;
  background-color: #ffebee;
  padding: 12px 15px;
  border-left: 4px solid #d63031;
  margin-bottom: 1.5rem;
  border-radius: 4px;
}

.success-message {
  color: #27ae60;
  background-color: #e8f8ef;
  padding: 12px 15px;
  border-left: 4px solid #27ae60;
  margin-bottom: 1.5rem;
  border-radius: 4px;
}

/* 头像圆形样式 */
.avatar-circle {
  display: block;
  margin: 0 auto;   /* 水平居中 */
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #3498db;
  cursor: pointer;
  transition: transform 0.2s ease;
}


.avatar-circle:hover {
  transform: scale(1.05);
}

/* 头像弹窗 */
#avatarModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

#avatarModal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#avatarModal span {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}

input[type="file"] {
  width: 100%;
  padding: 12px;
  margin: 10px 0 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
  transition: border 0.3s;
}

input[type="file"]:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

input[type="file"] {
  padding: 10px;
  background: #f9f9f9;
  border: 1px dashed #ccc;
  text-align: center;
}

input[type="file"]::file-selector-button {
  background: #3498db;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
}

/* 页脚样式 */
footer {
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
  background: linear-gradient(135deg, #3498db, #2e86de);
  color: white;
  font-size: 0.9rem;
}

.profile-container {
  max-width: 500px;
  margin: 50px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.profile-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #3498db;
}

.profile-info {
  margin-top: 20px;
  text-align: left;
}

.profile-info p {
  font-size: 16px;
  margin: 8px 0;
}

.profile-actions {
  margin-top: 20px;
}

.profile-actions a {
  display: inline-block;
  margin: 5px;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  background: #3498db;
  color: #fff;
}

.profile-actions a.logout {
  background: #e74c3c;
}

/* 响应式设计 - 移动端适配 */
@media (max-width: 576px) {
  main {
    padding: 1rem;
    margin: 1rem;
    border-radius: 8px;
  }

  .container {
    padding: 1.5rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  button {
    padding: 14px;
    /* 移动端增大点击区域 */
  }
}